/*
 * @Descripttion: 
 * @version: 
 * @Author: sueRimn
 * @Date: 2022-09-28 15:08:41
 * @LastEditors: sueRimn
 * @LastEditTime: 2023-02-27 14:31:24
 */
let express = require("express");
let router = express.Router();
let user = require("./api/user");
let component = require("./api/component");
let dataView = require("./api/dataView");
let requestConfig = require("./api/requestConfig");
let page = require("./api/page");
let detailPage = require("./api/detailPage");

router.post("/user/auth", user.auth);
router.post("/user/logout", user.logout);

router.post("/component/add", component.add);
router.post("/component/getList", component.getList);
router.post("/component/edit", component.edit);
router.get("/component/delete", component.delete);

router.post("/dataView/add", dataView.add);
router.post("/dataView/getList", dataView.getList);
router.post("/dataView/edit", dataView.edit);
router.get("/dataView/delete", dataView.delete);

router.post("/requestConfig/add", requestConfig.add);
router.post("/requestConfig/getList", requestConfig.getList);
router.post("/requestConfig/edit", requestConfig.edit);
router.get("/requestConfig/delete", requestConfig.delete);

router.post("/page/add", page.add);
router.post("/page/getList", page.getList);
router.post("/page/edit", page.edit);
router.get("/page/delete", page.delete);

router.post("/detailPage/getFormById", detailPage.getFormById);
router.post("/requestConfigTest/getList", detailPage.getRequestTestList);
router.get("/requestConfigTest/getList", detailPage.getRequestTestList);

module.exports = router;